package com.LostAndFound.service;

import java.sql.SQLException;

import com.LostAndFound.dao.LoginDao;
import com.LostAndFound.domain.Root;
import com.LostAndFound.domain.User;

public class LoginService {
	LoginDao dao = new LoginDao();
	
	public Root findRootForLogin(String username, String password) {
		Root root = null;
		try {
			root =  dao.findRootForLogin(username,password);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return root;
	}

	public User findUserForLogin(String username, String password) {
		User user = null;
		try {
			user =  dao.findUserForLogin(username,password);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return user;
	}

}
